﻿using ConfExpert.Forms.Base;
using System;
using System.Windows.Forms;

namespace ConfExpert.Forms.Depo.Texcomm
{
    public partial class Dugme : XForm
    {
        public Dugme()
        {
            InitializeComponent();
        }

        BindingSource bsDusgme;
        private void Dugme_Load(object sender, EventArgs e)
        {
            
            this.Text = "Düğme Kodları";

            TAM.TexcommDugmeTableAdapter = new Datasets.MyDataTableAdapters.TexcommDugmeTableAdapter();
            TAM.TexcommDugmeTableAdapter.Fill(ds.TexcommDugme);

            bsDusgme=new BindingSource(ds,"TexcommDugme");

            InitGridView(gvDugme, bsDusgme);

            AddBsToList(bsDusgme);
            
            gvDugme.BestFitColumns();

            gvDugme.Columns["DugmeId"].Visible = false;

            gvDugme.OptionsView.NewItemRowPosition = gvDugme.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom;
            btnSave.ItemClick += btnSave_ItemClick;


        }

        void btnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Save();
        }
    }
}